package com.bestdreamer.unsafe_sdf;

import java.text.SimpleDateFormat;

public class SafeTest {

    public static void main(String[] args) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String[] dateStringArray = new String[]{
                "2020-01-01","2020-01-02","2020-01-03","2020-01-04","2020-01-05","2020-01-06","2020-01-07",
                "2020-01-08","2020-01-09","2020-01-10","2020-01-11","2020-01-12"};
        MySafeThread[] threadArray = new MySafeThread[12];
        for(int i = 0; i < 10; i++){
            threadArray[i] = new MySafeThread(sdf, dateStringArray[i]);
        }
        for(int i = 0; i < 10; i++){
            threadArray[i].start();
        }
    }
}
